package com.jinghangzz.shop.back.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jinghangzz.shop.common.controller.BaseController;
import com.jinghangzz.shop.common.util.ConstatFinalUtil;

/**
 * 不需要登陆的Controller
 * @author TeaBig
 */
@Controller
public class NoLoginBackController extends BaseController
{
	/**
	 * 打开登陆页面
	 * @return
	 */
	@RequestMapping("/login")
	public String login()
	{
		ConstatFinalUtil.SYS_LOGGER.info("==login==");
		/* 方法的返回值:jsp的路径;(服务器端跳转)
		 * 前缀(/WEB-INF/jsp)+返回值(/back/login)+后缀(.jsp)
		 * (/WEB-INF/jsp/back/login.jsp
		 *  */
		return "/back/login";
	}
	
	/**
	 * 登陆提交页面
	 * @return
	 */
	@RequestMapping("/loginSubmit")
	public String loginSubmit()
	{
		ConstatFinalUtil.SYS_LOGGER.info("==loginSubmit==");
		/* 
		 * 登陆成功
		 * 客户端跳转
		 *  */
		return "redirect:/back/admins/main.htm";
	}
}
